
set work_path=%~dp0
cd /d %work_path%
cd ../
set work_path=%cd%

for /d %%s in (%work_path%\*) do (
cd %%s
echo Update Code %% %%s
start /B "%%s" cmd /c "git pull origin --no-edit"

)

@REM 等待10秒,等待代码更新完成
timeout /t 5 >nul


for /d %%s in (%work_path%\*) do (
cd %%s
echo Update Code %% %%s
start /B "%%s" cmd /c "git push origin"

)

@REM 等待10秒,防止未推送完成
timeout /t 10 >nul
echo ok...

exit /b